class NewsTopModel {
  late int id;
  late int pid;
  late String title;

  factory NewsTopModel.fromJson(Map<String, dynamic> json) => NewsTopModel(
      id: json["id"] ?? 0, pid: json["pid"] ?? 0, title: json["title"] ?? "");

  NewsTopModel({this.id = 0, this.pid = 0, this.title = ""});
}

class NewsBottomModel {
  int id;
  String cover;
  String title;
  String description;
  String publish;
  int view_count;
  String skipUrl;

  NewsBottomModel(
      {required this.id,
      required this.cover,
      required this.title,
      required this.description,
      required this.publish,
      required this.view_count,
      required this.skipUrl});

  factory NewsBottomModel.fromJson(Map<String, dynamic> json) =>
      NewsBottomModel(
          id: json["id"] ?? 0,
          cover: json["cover"] ?? "",
          title: json["title"] ?? "",
          description: json["description"] ?? "",
          publish: json["publish"] ?? "",
          view_count: json["view_count"] ?? 0,
          skipUrl: json["skipUrl"] ?? "");
}
